home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
graphics
/
mandlbx1.arc
/
MANDLBOX.DOC
< prev
next >
Wrap
Text File
|
1985-11-20
|
6KB
|
148 lines
Come Explore Mandelbrot Fractiles
with a fast interactive tool
M A N D L B O X
Featuring:
* Low Resolution First (like a Polaroid(TM) developing)
* Fast Zooming before developing is complete
* Reduced Calculations in Constant Areas
---> FRACTILE MATH:
Mandlbox displays the value of M(c) over a region of c and plots its value
as a color on the screen. M(c) is the function which returns the number of
times one has to iterate on z = z*z + c (starting at z=0) until the magnitude
of z is greater than 2. And by the way, c and z are imaginary numbers.
On the screen, the imaginary part is plotted horizontally the real part
vertically, and the number of iterations determines the color.
See the August 1985 issue of Scientific American for more details.
---> ZOOMING:
M(c) has the interesting property that in certain areas it becomes very
wrinkley, just like sin(1/x) does at x=0. Its interesting to zoom in on
these areas.
To define a sub-area of the screen to zoom into, down-click on one corner
of the desired region and drag the mouse to form the desired rectangle.
Clicking inside the rectangle will cause Mandlbox to expand the area in
the rectangle to full screen. Clicking outside the rectangle will remove
it. The approximate magnification of the window is shown at the upper left.
The good news is that Mandlbox displays a low resolution picture first, and
allows you to select another area to zoom in on even before the current
image has been completed. The bad news is that because the Mandlbox program
is computing much of the time, it only polls the mouse occasionally.
(when the arrow flashes) Especially at high magnifications, it may be
necessary to wait one flash between each of the mouse actions: down-clicking,
dragging to form a box, letting up, and then clicking in the center.
(Oh, for multiple user processes, which would allow much more interactivity.
If any one knows another way around this one, let me know.)
---> MENUE FUNCTIONS:
The other functions of the program are as follows:
ZOOM
OUT 4X -- Draw M(c) zoomed out 4x in each dimension.
The center of the screen remains the same.
UNDO LAST ZOOMIN -- Mandlbox maintains a stack of 50 zooms since
the start or last DEMO selection (see below).
This reverts to the previous scene.
NUMERICALLY -- Displays the location and size of the current
window, in real and imaginary parts. Editing
these numbers will move the display. (See
Caveat B)
COLOR
ROTATE COLORS -- The usual color lookup hack, but none the
less quite catchy.
SHOW CALC BOXES -- Displays the calculation boxes (see below)
on the screen. Try it once or twice.
ALGORITHM
ITER MAX -- Sets the maximum number of times that M(c)
will iterate testing for |z|>2 before it
gives up. 256-512 work well, things slow
down above that. (See Caveat B)
DEMO - Various pretty spots I've found in my perusing,
and named just for yucks. Try these first.
---> Whats new about MandlBOX that's not just your every-day MandelZOOM?
Mandlbox displays a low-resolution image first so that you can see roughly
where you are. Before its added full resolution, you can zoom into a sub-area.
This is particularly helpful if you know where you're headed.
Low resolution first is acomplished using a fat-bits like technique:
A whole square (a "box" a power of 2 pixels on each side) is drawn using
the value from only one calculation -- that of the pixel in the upper
left hand corner. Later the square is divided in quarters. The values of
only three new points must be calcualted, since one is the same as the
undivided square.
Some areas drawn are remarkably constant, and Mandlbox takes advantage of
that to reduce the amount of calculation required. As a box is about to be
divided in quarters, all of its neighbors are examined and if they are
all the same color, Mandlbox just doesn't bother dividing it. This algorithm
works because the Mandelbrot set is connected, and provides a speedup of
a factor of 1.3 to 5. Watch the meter on the upper right corner of the
window. It shows the percentage of all the pixels on the screen which have
been calculated.
---> SOME TIPS:
1) Mandlbox works best and possibly only on a 16-color low resolution screen.
2) Mandlbox works well on a 520ST with TOS in ROM, providing there isn't
a RAMDISK around. (The array required to hold unsplit boxes is big.)
3) If as you zoom in, the areas bordering solid black become "funny" looking,
(with extra black areas) try upping the iteration count.
4) Zooming in too far will yield fuzzy pictures. Actually this is because of
the inacuracies of the mantissa of single precision floating point. It happens
at magnifications above 500,000.
5) Caveat B (above): For some reason, GEM's FORM_DO doesn't erase the
characters viewed on the screen when one does <esc>, <bs>, or <del>.
They are actually erased, but you just see extra on the screen. I didn't
want to delay release for this one, plus I'm listening if any of you have
successfully done battle with this one!
---> In The Works:
Many improvements are contemplated, but I wanted to get something out
before I got sidetracked. I want to add a scene save-restore to disk,
caching demo scenes on the disk, pan and 2x zoomin/out without total
recompute, zooms that rotate too, multiple windows with sizing, ordering
computation by iteration_max (not just resolution), color histograms,
and a movie/animation. If you enjoy using Mandlbox, sending me a few
"atta-boy's" would help fuel these new extensions.
Also contact me if you have any other suggestions for neat extensions.
If you want to take the ball and work on any of these (providing you are
an Atari Developer) let me know.
Bug reports are encouraged. Be specific about exactly what causes the
bug and what doesn't.
I am: Allen King 1-617-449-3359 evenings
30 Gibson St
Needham Ma. ucbvax!aking@bfly-vax.bbn.com
02192